home *** CD-ROM | disk | FTP | other *** search
- Short: Config.library: Easy access to cfg files
- Author: Adam Dawes (Adam@Beachyhd.demon.co.uk)
- Uploader: Adam Dawes (Adam@Beachyhd.demon.co.uk)
- Type: dev/misc
-
-
- This archive contains config.library, a system to make accessing config
- files particularly easy, and all necessary documentation, includes, etc. to
- use the library with C and assembly language.
-
- This is a revision of my Config system, previously available as sourcecode
- in dev/c/Config101.lha. Config.library is completely compatible with the
- Config system; existing config files will still work, and the function
- names are identical.
-
- If anyone is interested in converting the includes and examples to work in
- any other languages (Amiga E, BASIC, etc.) then please contact me.
-
-
-
- Introduction
- ~~~~~~~~~~~~
-
- Well, I hate Windows as much as the next man, but occasionally I stumble
- across a good idea hidden away within the operating system.
-
- There are a couple of functions buried in there for reading and writing
- configuration files, and they actually make things very easy. I decided I'd
- had enough of messing around with config files on my Amiga, so I've ported
- the functions to Amiga C.
-
- The idea is that the configuration files take a definitive structure which
- the Config functions can understand. Each config file is split in to a
- number of "Sections" (which are stored in the config file as a keyword
- inside square brackets). In each of these sections are a number of "Items",
- each of which contains an actual data item. The items are local to the
- section that contains them, so it's perfectly legal to use one item name in
- several sections, they'll all be treated separately.
-
- The beauty behind the functions is you don't have to worry about creating
- files or scanning through them. Even when it comes to reading data, you
- don't have to care if the config file exists or not as you provide a
- default value to use if the file/section/item cannot be located.
- Everything is automated within the Config functions.
-
-
- ============================= Archive contents =============================
-
- Original Packed Ratio Date Time Name
- -------- ------- ----- --------- -------- -------------
- 1980 971 50.9% 07-Sep-96 16:25:50 +ConfigLib2.readme
- 4982 1181 76.2% 07-Sep-96 15:17:36 +Config.doc
- 11409 4262 62.6% 07-Sep-96 16:11:10 +Config.guide
- 566 262 53.7% 07-Sep-96 12:52:58 +config_protos.h
- 285 132 53.6% 07-Sep-96 13:01:36 +config.fd
- 305 184 39.6% 07-Sep-96 12:54:34 +config.h
- 294 179 39.1% 07-Sep-96 15:59:50 +config.i
- 325 165 49.2% 07-Sep-96 13:02:52 +config_pragmas.h
- 270 185 31.4% 07-Sep-96 12:55:46 +config.h
- 2952 1775 39.8% 07-Sep-96 16:04:12 +config.library
- 1923 722 62.4% 07-Sep-96 16:07:32 +ConfigTest.s
- 3041 748 75.4% 07-Sep-96 16:07:12 +ConfigTest.c
- -------- ------- ----- --------- --------
- 28332 10766 62.0% 15-Sep-96 19:29:08 12 files
-